<include file="public:header" />

<div class="allpagetop">工具<strong>/</strong>URL路由</div>
<div class="admin_main_nr_dbox">
<div class="pagetit">
	        <div class="ptit">URL</div>
				<include file="Url/topnav" /> 
	        <div class="clear"></div>
  </div>
		
		
    <div class="toptit">URL路由<span class="note link_g">(利用路由功能，可以让你的URL地址更加简洁和优雅，了解路由请登录<a href="http://www.thinkphp.cn/" target="_blank">ThinkPHP</a>官方查看相关说明)</span></div>
  <form action="{:RU('config/edit')}" method="post"   name="FormData" id="FormData" >
	  <div class="admin_form_main">
			<div class="fl">开启伪静态:</div>
			<div class="fr">
				<div id="J_url_model" class="imgchecked_small {$show['URL_MODEL']=='2' ? 'select' : ''}">
					<input name="URL_MODEL" type="hidden" value="{$show['URL_MODEL']=='2' ? 1 : 0}"/>
				</div>
				<div class="note">开启伪静态后需将伪静态配置文件放入站点目录，请参看安装目录里伪静态的使用说明或到论坛求助</div>
				<div class="clear"></div>
			</div>
	  
	   <div class="fl">开启路由:</div>
		<div class="fr">
		<div class="imgchecked_small <if condition="$show.YTATA_URL_RULE_OPEN eq 1 "> select</if>"><input name="YTATA_URL_RULE_OPEN" type="hidden" value="{$show.YTATA_URL_RULE_OPEN}" /></div>
		
		
		<div class="note">开启理由功能后，您可以自定义规则来实现您想要的URL地址</div>
		<div class="clear"></div>
		</div>
		
	 
	 
	    <div class="fl"></div>
		<div class="fr">
		<input name="" type="submit" class="admin_submit big"    value="保存配置"/>
		</div>
		
		
		
		<div class="clear"></div>
		
	 
  </div>
  
 
  
  
   
  </form>
</div>
<include file="public:footer" />
<script>
	// 切换伪静态开关提示
	$("#J_url_model").click(function () {
			var url_model = $("input[name='URL_MODEL']").val();
			
			if (url_model == 1) { // 开启普通URL模式
          var qsDialog = $(this).Udialog({
              title: '<b>提示</b>',
              loading: true,
              footer : true,
							cancel: function () {
									$("#J_url_model").addClass('select');
                  $("input[name='URL_MODEL']").val(1);
              },
							yes: function () {
									var $rule_open = $("input[name='YTATA_URL_RULE_OPEN']");
									if ($rule_open.val() == 1) {
									    $rule_open.val(0);
									    $rule_open.parent('.imgchecked_small').removeClass('select');
									}
              }
          });
				qsDialog.setContent("<div style='width: 420px;'>关闭伪静态后将不支持路由功能。如果你需要使用路由功能，请先开启伪静态。</div>");
			}
  });
</script>
 
</body>
</html>